<template>
  <el-table :data="tableData" border style="width: 100%">
    <el-table-column prop="bidTitle" label="标的名称"> </el-table-column>
    <el-table-column prop="createTime" label="投标结束时间" width="180">
    </el-table-column>
    <el-table-column prop="statusName" label="状态" width="180">
      <template #default="{row}">
        <span>{{ row.statusName }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="bidTitle" label="操作" width="180">
      <template #default="{row}">
        <el-button
          type="text"
          :disabled="row.status != 4"
          @click="goto22(row.enterpriseId, row.status)"
          >提交资料</el-button
        >
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
import { getListRe } from "./a";
export default {
  data() {
    return {
      tableData: []
    };
  },
  created() {
    this.getList();
  },
  methods: {
    goto22(id, status) {
      if (status == 4) {
        const url = this.$router.resolve({
          path: "/enterprise/enterpriseInfo",
          query: { id }
        });
        window.open(url.href, "_blank");
      }
    },
    getList() {
      getListRe().then(res => {
        console.log(res.rows);
        this.tableData = res.rows;
      });
    }
  }
};
</script>
